Optimal. Leaf size=25 \[ -\frac {a \log (\cos (c+d x))}{d}+\frac {b \sec (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {3969, 3556,
2686, 8} \begin {gather*} \frac {b \sec (c+d x)}{d}-\frac {a \log (\cos (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2686
Rule 3556
Rule 3969
Rubi steps
\begin {align*} \int (a+b \sec (c+d x)) \tan (c+d x) \, dx &=a \int \tan (c+d x) \, dx+b \int \sec (c+d x) \tan (c+d x) \, dx\\ &=-\frac {a \log (\cos (c+d x))}{d}+\frac {b \text {Subst}(\int 1 \, dx,x,\sec (c+d x))}{d}\\ &=-\frac {a \log (\cos (c+d x))}{d}+\frac {b \sec (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 25, normalized size = 1.00 \begin {gather*} -\frac {a \log (\cos (c+d x))}{d}+\frac {b \sec (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 23, normalized size = 0.92
method | result | size |
derivativedivides | \(\frac {b \sec \left (d x +c \right )+a \ln \left (\sec \left (d x +c \right )\right )}{d}\) | \(23\) |
default | \(\frac {b \sec \left (d x +c \right )+a \ln \left (\sec \left (d x +c \right )\right )}{d}\) | \(23\) |
risch | \(i a x +\frac {2 i a c}{d}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(61\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 26, normalized size = 1.04 \begin {gather*} -\frac {a \log \left (\cos \left (d x + c\right )\right ) - \frac {b}{\cos \left (d x + c\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.66, size = 34, normalized size = 1.36 \begin {gather*} -\frac {a \cos \left (d x + c\right ) \log \left (-\cos \left (d x + c\right )\right ) - b}{d \cos \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.10, size = 37, normalized size = 1.48 \begin {gather*} \begin {cases} \frac {a \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {b \sec {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a + b \sec {\left (c \right )}\right ) \tan {\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 107 vs.
\(2 (25) = 50\).
time = 0.48, size = 107, normalized size = 4.28 \begin {gather*} \frac {a \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right ) - a \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) + \frac {a + 2 \, b + \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}}{\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.30, size = 40, normalized size = 1.60 \begin {gather*} \frac {2\,a\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{d}-\frac {2\,b}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________